package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.takebal.redpacketrandom.RedPacketRandomQuery;
import com.uzai.console.entity.RedPacketRandom;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface RedPacketRandomMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int insert(RedPacketRandom record);

    int insertSelective(RedPacketRandom record);

    RedPacketRandom selectById(@Param("id") Long id, @Param("merId") Long merId);

    int updateByIdSelective(RedPacketRandom record);

    int updateById(RedPacketRandom record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    ArrayList<RedPacketRandom> findByList(Page<RedPacketRandom> page, @Param("query") RedPacketRandomQuery query);

}